package com.ruoyi.system.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.service.IUserInfoService;
import org.apache.http.HttpRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/usermsg")
public class UsermessageController {
    @Autowired
    private IUserInfoService userInfoServiceInfo;
    @RequestMapping(path = "/userInfo",method = RequestMethod.POST)
    @ResponseBody
    public AjaxResult getusermessage(HttpServletRequest request){
        Long userid = Long.valueOf(request.getParameter("userid"));
        return AjaxResult.success(userInfoServiceInfo.getusermsg(userid));
    }
}
